Dynomotion

Group: DynoMotion Message: 3394 From: himykabibble Date: 1/24/2012
Subject: How Do I....
I feel stupid for not being able to figure this out, but I can't....

I have a DSP program to process S words. It runs in thread 2, takes the RPM command from Persist[4]. Works fine. But, I need to call it from my app, to process SSO and manually entered spindle commands. The RPM word passed in Persist[4] is a float. I have been unable to find any way within dotNET to WRITE a float to Persist. The only options I've found are the script commands SetPersistDec and SerPersistHex.

How do I do this?

Regards,
Ray L.
Group: DynoMotion Message: 3395 From: Tom Kerekes Date: 1/24/2012
Subject: Re: How Do I....
Hi Ray,
 
Looks like C# doesn't make it easy.  The DSP is expecting the 32-bit binary image of the floating point number to be sent as a 32-bit integer.
 
As you may know in C it is easy. Just make a point to the float, recast it as a pointer to an integer, then dereference the pointer:
 
 
float f=1.234;
int i;
 
i = *(int *)&f;
 
 
But I doubt anything like that is possible in C# as it breaks all the rules.
 
I found BitConverter
 
 
Looks the that will give you the 4 bytes that make up the float.
 
You can then just combine them to make an integer the send it using SetPersistHex.
 
I suppose we should add a library call as SetPersistFloat to handle it easily over on the C side.
 
HTH
TK
 
 

Group: DynoMotion Message: 3396 From: himykabibble Date: 1/24/2012
Subject: Re: How Do I....
Tom,

I would very much like to have that library call, and a corresponding method in dotNet.

While I have you here.... In the interpreter, what is the difference between "Abort" and "Halt"? I'm assuming "Halt" is used to stop parsing for something like a FeedHold, so that it retains state, and can be resumed, while "Abort" stops and discards state, essentially resetting the interpreter. Is that correct?

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
>  
> Looks like C# doesn't make it easy.  The DSP is expecting the 32-bit binary image of the floating point number to be sent as a 32-bit integer.
>  
> As you may know in C it is easy. Just make a point to the float, recast it as a pointer to an integer, then dereference the pointer:
>  
>  
> float f=1.234;
> int i;
>  
> i = *(int *)&f;
>  
>  
> But I doubt anything like that is possible in C# as it breaks all the rules.
>  
> I found BitConverter
>  
> http://msdn.microsoft.com/en-us/library/yhwsaf3w.aspx
>  
> Looks the that will give you the 4 bytes that make up the float.
>  
> You can then just combine them to make an integer the send it using SetPersistHex.
>  
> I suppose we should add a library call as SetPersistFloat to handle it easily over on the C side.
>  
> HTH
> TK
>  
>  
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, January 24, 2012 4:44 PM
> Subject: [DynoMotion] How Do I....
>
>
>  
> I feel stupid for not being able to figure this out, but I can't....
>
> I have a DSP program to process S words. It runs in thread 2, takes the RPM command from Persist[4]. Works fine. But, I need to call it from my app, to process SSO and manually entered spindle commands. The RPM word passed in Persist[4] is a float. I have been unable to find any way within dotNET to WRITE a float to Persist. The only options I've found are the script commands SetPersistDec and SerPersistHex.
>
> How do I do this?
>
> Regards,
> Ray L.
>
Group: DynoMotion Message: 3397 From: Tom Kerekes Date: 1/24/2012
Subject: Re: How Do I....
Hi Ray,
 
Noted.  Yes that is essentially correct.
 
TK

Group: DynoMotion Message: 3400 From: himykabibble Date: 1/24/2012
Subject: Re: How Do I....
I have SSO working. So, next "How do I..." questions:

How do I get the current tool, and current fixture? They don't seem to be available in the APIs. I can "fudge" by parsing the current G-code line, but that will only get me close, which could be dangerous. I can see how I can use the DSP to capture the current tool accurately, but not the current fixture.

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
>  
> Noted.  Yes that is essentially correct.
>  
> TK
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, January 24, 2012 5:13 PM
> Subject: [DynoMotion] Re: How Do I....
>
>
>  
> Tom,
>
> I would very much like to have that library call, and a corresponding method in dotNet.
>
> While I have you here.... In the interpreter, what is the difference between "Abort" and "Halt"? I'm assuming "Halt" is used to stop parsing for something like a FeedHold, so that it retains state, and can be resumed, while "Abort" stops and discards state, essentially resetting the interpreter. Is that correct?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> >  
> > Looks like C# doesn't make it easy.  The DSP is expecting the 32-bit binary image of the floating point number to be sent as a 32-bit integer.
> >  
> > As you may know in C it is easy. Just make a point to the float, recast it as a pointer to an integer, then dereference the pointer:
> >  
> >  
> > float f=1.234;
> > int i;
> >  
> > i = *(int *)&f;
> >  
> >  
> > But I doubt anything like that is possible in C# as it breaks all the rules.
> >  
> > I found BitConverter
> >  
> > http://msdn.microsoft.com/en-us/library/yhwsaf3w.aspx
> >  
> > Looks the that will give you the 4 bytes that make up the float.
> >  
> > You can then just combine them to make an integer the send it using SetPersistHex.
> >  
> > I suppose we should add a library call as SetPersistFloat to handle it easily over on the C side.
> >  
> > HTH
> > TK
> >  
> >  
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tuesday, January 24, 2012 4:44 PM
> > Subject: [DynoMotion] How Do I....
> >
> >
> >  
> > I feel stupid for not being able to figure this out, but I can't....
> >
> > I have a DSP program to process S words. It runs in thread 2, takes the RPM command from Persist[4]. Works fine. But, I need to call it from my app, to process SSO and manually entered spindle commands. The RPM word passed in Persist[4] is a float. I have been unable to find any way within dotNET to WRITE a float to Persist. The only options I've found are the script commands SetPersistDec and SerPersistHex.
> >
> > How do I do this?
> >
> > Regards,
> > Ray L.
> >
>
Group: DynoMotion Message: 3401 From: Brad Murry Date: 1/24/2012
Subject: Re: How Do I....

Check out the SetupParams from the Interpreter.

 

Brad

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of himykabibble
Sent: Tuesday, January 24, 2012 7:38 PM
To: DynoMotion@yahoogroups.com
Subject: [DynoMotion] Re: How Do I....

 

 

I have SSO working. So, next "How do I..." questions:

How do I get the current tool, and current fixture? They don't seem to be available in the APIs. I can "fudge" by parsing the current G-code line, but that will only get me close, which could be dangerous. I can see how I can use the DSP to capture the current tool accurately, but not the current fixture.

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
>  
> Noted.  Yes that is essentially correct.
>  
> TK
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, January 24, 2012 5:13 PM
> Subject: [DynoMotion] Re: How Do I....
>
>
>  
> Tom,
>
> I would very much like to have that library call, and a corresponding method in dotNet.
>
> While I have you here.... In the interpreter, what is the difference between "Abort" and "Halt"? I'm assuming "Halt" is used to stop parsing for something like a FeedHold, so that it retains state, and can be resumed, while "Abort" stops and discards state, essentially resetting the interpreter. Is that correct?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> >  
> > Looks like C# doesn't make it easy.  The DSP is expecting the 32-bit binary image of the floating point number to be sent as a 32-bit integer.
> >  
> > As you may know in C it is easy. Just make a point to the float, recast it as a pointer to an integer, then dereference the pointer:
> >  
> >  
> > float f=1.234;
> > int i;
> >  
> > i = *(int *)&f;
> >  
> >  
> > But I doubt anything like that is possible in C# as it breaks all the rules.
> >  
> > I found BitConverter
> >  
> > http://msdn.microsoft.com/en-us/library/yhwsaf3w.aspx
> >  
> > Looks the that will give you the 4 bytes that make up the float.
> >  
> > You can then just combine them to make an integer the send it using SetPersistHex.
> >  
> > I suppose we should add a library call as SetPersistFloat to handle it easily over on the C side.
> >  
> > HTH
> > TK
> >  
> >  
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tuesday, January 24, 2012 4:44 PM
> > Subject: [DynoMotion] How Do I....
> >
> >
> >  
> > I feel stupid for not being able to figure this out, but I can't....
> >
> > I have a DSP program to process S words. It runs in thread 2, takes the RPM command from Persist[4]. Works fine. But, I need to call it from my app, to process SSO and manually entered spindle commands. The RPM word passed in Persist[4] is a float. I have been unable to find any way within dotNET to WRITE a float to Persist. The only options I've found are the script commands SetPersistDec and SerPersistHex.
> >
> > How do I do this?
> >
> > Regards,
> > Ray L.
> >
>

Group: DynoMotion Message: 3404 From: himykabibble Date: 1/24/2012
Subject: Re: How Do I....
Brad,

I see some tool number info in there. SetupParams.CurrentToolSlot seems like the only one that would help me, but it doesn't appear to be reflecting the current tool number.

I don't see anything that would give be the current fixture. There is a method to set the fixture. Perhaps both would come out of the Modal reports?

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, Brad Murry <bradodarb@...> wrote:
>
> Check out the SetupParams from the Interpreter.
>
>
>
> Brad
>
>
>
> From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On
> Behalf Of himykabibble
> Sent: Tuesday, January 24, 2012 7:38 PM
> To: DynoMotion@yahoogroups.com
> Subject: [DynoMotion] Re: How Do I....
>
>
>
>
>
> I have SSO working. So, next "How do I..." questions:
>
> How do I get the current tool, and current fixture? They don't seem to be
> available in the APIs. I can "fudge" by parsing the current G-code line, but
> that will only get me close, which could be dangerous. I can see how I can
> use the DSP to capture the current tool accurately, but not the current
> fixture.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com> ,
> Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > Â
> > Noted. Yes that is essentially correct.
> > Â
> > TK
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > Sent: Tuesday, January 24, 2012 5:13 PM
> > Subject: [DynoMotion] Re: How Do I....
> >
> >
> > Â
> > Tom,
> >
> > I would very much like to have that library call, and a corresponding
> method in dotNet.
> >
> > While I have you here.... In the interpreter, what is the difference
> between "Abort" and "Halt"? I'm assuming "Halt" is used to stop parsing for
> something like a FeedHold, so that it retains state, and can be resumed,
> while "Abort" stops and discards state, essentially resetting the
> interpreter. Is that correct?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com> ,
> Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > ÂÂ
> > > Looks like C# doesn't make it easy. The DSP is expecting the 32-bit
> binary image of the floating point number to be sent as a 32-bit integer.
> > > ÂÂ
> > > As you may know in C it is easy. Just make a point to the float, recast
> it as a pointer to an integer, then dereference the pointer:
> > > ÂÂ
> > > ÂÂ
> > > float f=1.234;
> > > int i;
> > > ÂÂ
> > > i = *(int *)&f;
> > > ÂÂ
> > > ÂÂ
> > > But I doubt anything like that is possible in C# as it breaks all the
> rules.
> > > ÂÂ
> > > I found BitConverter
> > > ÂÂ
> > > http://msdn.microsoft.com/en-us/library/yhwsaf3w.aspx
> > > ÂÂ
> > > Looks the that will give you the 4 bytes that make up the float.
> > > ÂÂ
> > > You can then just combine them to make an integer the send it using
> SetPersistHex.
> > > ÂÂ
> > > I suppose we should add a library call as SetPersistFloat to handle it
> easily over on the C side.
> > > ÂÂ
> > > HTH
> > > TK
> > > ÂÂ
> > > ÂÂ
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > > Sent: Tuesday, January 24, 2012 4:44 PM
> > > Subject: [DynoMotion] How Do I....
> > >
> > >
> > > ÂÂ
> > > I feel stupid for not being able to figure this out, but I can't....
> > >
> > > I have a DSP program to process S words. It runs in thread 2, takes the
> RPM command from Persist[4]. Works fine. But, I need to call it from my app,
> to process SSO and manually entered spindle commands. The RPM word passed in
> Persist[4] is a float. I have been unable to find any way within dotNET to
> WRITE a float to Persist. The only options I've found are the script
> commands SetPersistDec and SerPersistHex.
> > >
> > > How do I do this?
> > >
> > > Regards,
> > > Ray L.
> > >
> >
>
Group: DynoMotion Message: 3405 From: Brad Murry Date: 1/24/2012
Subject: Re: How Do I....

I use CurrentToolSlot in MM and it appears to work correctly.

 

As far as displaying the current offset, you can use OriginIndex and derive the Gword in a switch statement where case 1: return “G54”, etc… thru G59.3

 

 

-Brad Murry

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of himykabibble
Sent: Tuesday, January 24, 2012 9:18 PM
To: DynoMotion@yahoogroups.com
Subject: [DynoMotion] Re: How Do I....

 

 

Brad,

I see some tool number info in there. SetupParams.CurrentToolSlot seems like the only one that would help me, but it doesn't appear to be reflecting the current tool number.

I don't see anything that would give be the current fixture. There is a method to set the fixture. Perhaps both would come out of the Modal reports?

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, Brad Murry <bradodarb@...> wrote:
>
> Check out the SetupParams from the Interpreter.
>
>
>
> Brad
>
>
>
> From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On
> Behalf Of himykabibble
> Sent: Tuesday, January 24, 2012 7:38 PM
> To: DynoMotion@yahoogroups.com
> Subject: [DynoMotion] Re: How Do I....
>
>
>
>
>
> I have SSO working. So, next "How do I..." questions:
>
> How do I get the current tool, and current fixture? They don't seem to be
> available in the APIs. I can "fudge" by parsing the current G-code line, but
> that will only get me close, which could be dangerous. I can see how I can
> use the DSP to capture the current tool accurately, but not the current
> fixture.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com> ,
> Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > Â
> > Noted. Yes that is essentially correct.
> > Â
> > TK
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > Sent: Tuesday, January 24, 2012 5:13 PM
> > Subject: [DynoMotion] Re: How Do I....
> >
> >
> > Â
> > Tom,
> >
> > I would very much like to have that library call, and a corresponding
> method in dotNet.
> >
> > While I have you here.... In the interpreter, what is the difference
> between "Abort" and "Halt"? I'm assuming "Halt" is used to stop parsing for
> something like a FeedHold, so that it retains state, and can be resumed,
> while "Abort" stops and discards state, essentially resetting the
> interpreter. Is that correct?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com> ,
> Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > ÂÂ
> > > Looks like C# doesn't make it easy. The DSP is expecting the 32-bit
> binary image of the floating point number to be sent as a 32-bit integer.
> > > ÂÂ
> > > As you may know in C it is easy. Just make a point to the float, recast
> it as a pointer to an integer, then dereference the pointer:
> > > ÂÂ
> > > ÂÂ
> > > float f=1.234;
> > > int i;
> > > ÂÂ
> > > i = *(int *)&f;
> > > ÂÂ
> > > ÂÂ
> > > But I doubt anything like that is possible in C# as it breaks all the
> rules.
> > > ÂÂ
> > > I found BitConverter
> > > ÂÂ
> > > http://msdn.microsoft.com/en-us/library/yhwsaf3w.aspx
> > > ÂÂ
> > > Looks the that will give you the 4 bytes that make up the float.
> > > ÂÂ
> > > You can then just combine them to make an integer the send it using
> SetPersistHex.
> > > ÂÂ
> > > I suppose we should add a library call as SetPersistFloat to handle it
> easily over on the C side.
> > > ÂÂ
> > > HTH
> > > TK
> > > ÂÂ
> > > ÂÂ
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > > Sent: Tuesday, January 24, 2012 4:44 PM
> > > Subject: [DynoMotion] How Do I....
> > >
> > >
> > > ÂÂ
> > > I feel stupid for not being able to figure this out, but I can't....
> > >
> > > I have a DSP program to process S words. It runs in thread 2, takes the
> RPM command from Persist[4]. Works fine. But, I need to call it from my app,
> to process SSO and manually entered spindle commands. The RPM word passed in
> Persist[4] is a float. I have been unable to find any way within dotNET to
> WRITE a float to Persist. The only options I've found are the script
> commands SetPersistDec and SerPersistHex.
> > >
> > > How do I do this?
> > >
> > > Regards,
> > > Ray L.
> > >
> >
>

Group: DynoMotion Message: 3406 From: himykabibble Date: 1/24/2012
Subject: Re: How Do I....
Ok, I got the tool number display working. I had a subtle cut-and-paste "oops". Still don't see the fixture number. Do I recall reading in another thread some time back that it's not readily available?

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Brad,
>
> I see some tool number info in there. SetupParams.CurrentToolSlot seems like the only one that would help me, but it doesn't appear to be reflecting the current tool number.
>
> I don't see anything that would give be the current fixture. There is a method to set the fixture. Perhaps both would come out of the Modal reports?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Brad Murry <bradodarb@> wrote:
> >
> > Check out the SetupParams from the Interpreter.
> >
> >
> >
> > Brad
> >
> >
> >
> > From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On
> > Behalf Of himykabibble
> > Sent: Tuesday, January 24, 2012 7:38 PM
> > To: DynoMotion@yahoogroups.com
> > Subject: [DynoMotion] Re: How Do I....
> >
> >
> >
> >
> >
> > I have SSO working. So, next "How do I..." questions:
> >
> > How do I get the current tool, and current fixture? They don't seem to be
> > available in the APIs. I can "fudge" by parsing the current G-code line, but
> > that will only get me close, which could be dangerous. I can see how I can
> > use the DSP to capture the current tool accurately, but not the current
> > fixture.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com> ,
> > Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > Â
> > > Noted. Yes that is essentially correct.
> > > Â
> > > TK
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > > Sent: Tuesday, January 24, 2012 5:13 PM
> > > Subject: [DynoMotion] Re: How Do I....
> > >
> > >
> > > Â
> > > Tom,
> > >
> > > I would very much like to have that library call, and a corresponding
> > method in dotNet.
> > >
> > > While I have you here.... In the interpreter, what is the difference
> > between "Abort" and "Halt"? I'm assuming "Halt" is used to stop parsing for
> > something like a FeedHold, so that it retains state, and can be resumed,
> > while "Abort" stops and discards state, essentially resetting the
> > interpreter. Is that correct?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com> ,
> > Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > ÂÂ
> > > > Looks like C# doesn't make it easy. The DSP is expecting the 32-bit
> > binary image of the floating point number to be sent as a 32-bit integer.
> > > > ÂÂ
> > > > As you may know in C it is easy. Just make a point to the float, recast
> > it as a pointer to an integer, then dereference the pointer:
> > > > ÂÂ
> > > > ÂÂ
> > > > float f=1.234;
> > > > int i;
> > > > ÂÂ
> > > > i = *(int *)&f;
> > > > ÂÂ
> > > > ÂÂ
> > > > But I doubt anything like that is possible in C# as it breaks all the
> > rules.
> > > > ÂÂ
> > > > I found BitConverter
> > > > ÂÂ
> > > > http://msdn.microsoft.com/en-us/library/yhwsaf3w.aspx
> > > > ÂÂ
> > > > Looks the that will give you the 4 bytes that make up the float.
> > > > ÂÂ
> > > > You can then just combine them to make an integer the send it using
> > SetPersistHex.
> > > > ÂÂ
> > > > I suppose we should add a library call as SetPersistFloat to handle it
> > easily over on the C side.
> > > > ÂÂ
> > > > HTH
> > > > TK
> > > > ÂÂ
> > > > ÂÂ
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > > > Sent: Tuesday, January 24, 2012 4:44 PM
> > > > Subject: [DynoMotion] How Do I....
> > > >
> > > >
> > > > ÂÂ
> > > > I feel stupid for not being able to figure this out, but I can't....
> > > >
> > > > I have a DSP program to process S words. It runs in thread 2, takes the
> > RPM command from Persist[4]. Works fine. But, I need to call it from my app,
> > to process SSO and manually entered spindle commands. The RPM word passed in
> > Persist[4] is a float. I have been unable to find any way within dotNET to
> > WRITE a float to Persist. The only options I've found are the script
> > commands SetPersistDec and SerPersistHex.
> > > >
> > > > How do I do this?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > >
> >
>
Group: DynoMotion Message: 3407 From: himykabibble Date: 1/24/2012
Subject: Re: How Do I....
Brad,

That did it! Thanks!

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, Brad Murry <bradodarb@...> wrote:
>
> I use CurrentToolSlot in MM and it appears to work correctly.
>
>
>
> As far as displaying the current offset, you can use OriginIndex and derive
> the Gword in a switch statement where case 1: return "G54", etc… thru G59.3
>
>
>
>
>
> -Brad Murry
>
>
>
> From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On
> Behalf Of himykabibble
> Sent: Tuesday, January 24, 2012 9:18 PM
> To: DynoMotion@yahoogroups.com
> Subject: [DynoMotion] Re: How Do I....
>
>
>
>
>
> Brad,
>
> I see some tool number info in there. SetupParams.CurrentToolSlot seems like
> the only one that would help me, but it doesn't appear to be reflecting the
> current tool number.
>
> I don't see anything that would give be the current fixture. There is a
> method to set the fixture. Perhaps both would come out of the Modal reports?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com> ,
> Brad Murry <bradodarb@> wrote:
> >
> > Check out the SetupParams from the Interpreter.
> >
> >
> >
> > Brad
> >
> >
> >
> > From: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> [mailto:DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com> ]
> On
> > Behalf Of himykabibble
> > Sent: Tuesday, January 24, 2012 7:38 PM
> > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > Subject: [DynoMotion] Re: How Do I....
> >
> >
> >
> >
> >
> > I have SSO working. So, next "How do I..." questions:
> >
> > How do I get the current tool, and current fixture? They don't seem to be
> > available in the APIs. I can "fudge" by parsing the current G-code line,
> but
> > that will only get me close, which could be dangerous. I can see how I can
> > use the DSP to capture the current tool accurately, but not the current
> > fixture.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> <mailto:DynoMotion%40yahoogroups.com> ,
> > Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > Â
> > > Noted. Yes that is essentially correct.
> > > Â
> > > TK
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> <mailto:DynoMotion%40yahoogroups.com>
> > > Sent: Tuesday, January 24, 2012 5:13 PM
> > > Subject: [DynoMotion] Re: How Do I....
> > >
> > >
> > > Â
> > > Tom,
> > >
> > > I would very much like to have that library call, and a corresponding
> > method in dotNet.
> > >
> > > While I have you here.... In the interpreter, what is the difference
> > between "Abort" and "Halt"? I'm assuming "Halt" is used to stop parsing
> for
> > something like a FeedHold, so that it retains state, and can be resumed,
> > while "Abort" stops and discards state, essentially resetting the
> > interpreter. Is that correct?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> <mailto:DynoMotion%40yahoogroups.com> ,
> > Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > ÂÂ
> > > > Looks like C# doesn't make it easy. The DSP is expecting the 32-bit
> > binary image of the floating point number to be sent as a 32-bitÂÂ
> integer.
> > > > ÂÂ
> > > > As you may know in C it is easy. Just make a point to the float,
> recast
> > it as a pointer to an integer, then dereference the pointer:
> > > > ÂÂ
> > > > ÂÂ
> > > > float f=1.234;
> > > > int i;
> > > > ÂÂ
> > > > i = *(int *)&f;
> > > > ÂÂ
> > > > ÂÂ
> > > > But I doubt anything like that is possible in C# as it breaks all the
> > rules.
> > > > ÂÂ
> > > > I found BitConverter
> > > > ÂÂ
> > > > http://msdn.microsoft.com/en-us/library/yhwsaf3w.aspx
> > > > ÂÂ
> > > > Looks the that will give you the 4 bytes that make up the float.
> > > > ÂÂ
> > > > You can then just combine them to make an integer the send it using
> > SetPersistHex.
> > > > ÂÂ
> > > > I suppose we should add a library call as SetPersistFloat to handle it
> > easily over on the C side.
> > > > ÂÂ
> > > > HTH
> > > > TK
> > > > ÂÂ
> > > > ÂÂ
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> <mailto:DynoMotion%40yahoogroups.com>
> > > > Sent: Tuesday, January 24, 2012 4:44 PM
> > > > Subject: [DynoMotion] How Do I....
> > > >
> > > >
> > > > ÂÂ
> > > > I feel stupid for not being able to figure this out, but I can't....
> > > >
> > > > I have a DSP program to process S words. It runs in thread 2, takes
> the
> > RPM command from Persist[4]. Works fine. But, I need to call it from my
> app,
> > to process SSO and manually entered spindle commands. The RPM word passed
> in
> > Persist[4] is a float. I have been unable to find any way within dotNET to
> > WRITE a float to Persist. The only options I've found are the script
> > commands SetPersistDec and SerPersistHex.
> > > >
> > > > How do I do this?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > >
> >
>